package com.smart.community.property.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 维修工单工作管理扩展VO
 *
 * @author Wu.Liang
 * @since 2025-01-30
 * @version 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "维修工单工作管理扩展VO")
public class RepairOrderWorkVO extends RepairOrderVO {

    @Schema(description = "物业公司ID", example = "1")
    private Long propertyCompanyId;

    @Schema(description = "物业公司名称", example = "智慧物业有限公司")
    private String propertyCompanyName;

    @Schema(description = "维修人员姓名", example = "张三")
    private String repairmanName;

    @Schema(description = "维修人员电话", example = "13800138000")
    private String repairmanPhone;

    @Schema(description = "维修人员部门", example = "维修部")
    private String repairmanDepartment;

    @Schema(description = "维修人员职位", example = "高级维修工")
    private String repairmanPosition;

    @Schema(description = "预计完成时间", example = "2025-01-31 18:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime estimatedCompleteTime;

    @Schema(description = "实际开始时间", example = "2025-01-30 09:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualStartTime;

    @Schema(description = "维修材料清单", example = "[\"螺丝刀\", \"扳手\", \"电线\"]")
    private List<String> materialList;

    @Schema(description = "维修费用", example = "150.00")
    private BigDecimal repairCost;

    @Schema(description = "工时（小时）", example = "2.5")
    private BigDecimal workHours;

    @Schema(description = "维修结果描述", example = "已修复门锁，更换了损坏的零件")
    private String repairResult;

    @Schema(description = "客户满意度", example = "5")
    private Integer customerSatisfaction;

    @Schema(description = "客户评价", example = "维修师傅很专业，服务态度很好")
    private String customerComment;

    @Schema(description = "是否需要回访", example = "true")
    private Boolean needFollowUp;

    @Schema(description = "回访时间", example = "2025-02-01 10:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime followUpTime;

    @Schema(description = "回访结果", example = "客户满意，无需进一步处理")
    private String followUpResult;

    @Schema(description = "工单来源", example = "1")
    private Integer source;

    @Schema(description = "工单来源名称", example = "业主报修")
    private String sourceName;

    @Schema(description = "是否紧急工单", example = "false")
    private Boolean isUrgent;

    @Schema(description = "工单标签", example = "[\"紧急\", \"重要\"]")
    private List<String> tags;

    @Schema(description = "关联工单ID", example = "123")
    private Long relatedOrderId;

    @Schema(description = "工单分类", example = "1")
    private Integer category;

    @Schema(description = "工单分类名称", example = "设备维修")
    private String categoryName;

    @Schema(description = "维修地点详细描述", example = "A栋1单元101室客厅")
    private String locationDetail;

    @Schema(description = "是否已通知客户", example = "true")
    private Boolean customerNotified;

    @Schema(description = "通知时间", example = "2025-01-30 08:30:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime notificationTime;

    @Schema(description = "通知方式", example = "1")
    private Integer notificationMethod;

    @Schema(description = "通知方式名称", example = "电话通知")
    private String notificationMethodName;

    @Schema(description = "工单处理时长（小时）", example = "4.5")
    private BigDecimal processingDuration;

    @Schema(description = "是否超时", example = "false")
    private Boolean isTimeout;

    @Schema(description = "超时时长（小时）", example = "0.5")
    private BigDecimal timeoutDuration;

    @Schema(description = "工单优先级名称", example = "高")
    private String priorityName;

    @Schema(description = "工单状态名称", example = "进行中")
    private String statusName;

    @Schema(description = "维修类型名称", example = "设备维修")
    private String repairTypeName;

    @Schema(description = "紧急程度名称", example = "一般")
    private String urgencyLevelName;

    @Schema(description = "是否可分配", example = "true")
    private Boolean canAssign = false;

    @Schema(description = "是否可完成", example = "true")
    private Boolean canComplete = false;

    @Schema(description = "是否可取消", example = "true")
    private Boolean canCancel = false;

    @Schema(description = "是否可评价", example = "true")
    private Boolean canRate = false;

    @Schema(description = "是否可回访", example = "true")
    private Boolean canFollowUp = false;
}
